import fetch from 'utils/fetch';
import { sift_query_list } from 'utils/sift';
// ! 密码登录
export function loginByPwd(data) {
    return fetch({
        url: '/user/login',
        method: 'post',
        data: data
    });
}

// ! 退出登录
export function logOut(id) {
    return fetch({
      url: `/user/withdraw?id=${id}`,
      method: 'get'
    });
}

// 是否登录
export function getVerifyToken(query){
    return fetch({
        url: '/user/is_login',
        method: 'get',
	    params: sift_query_list(query)
    });
}

//用户信息
export function getUserInfo(id){
    return fetch({
        url: `User/${id}`,
        method: 'get'
    });
}